package com.lj.back.manage.scaffold.module.job.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lj.back.manage.scaffold.module.job.DO.ScheduleJobLogDO;
import com.lj.back.manage.scaffold.module.job.DTO.ScheduleJobLogDTO;
import com.lj.back.manage.scaffold.module.job.DTO.ScheduleJobLogPageQuery;
import com.lj.back.manage.scaffold.module.job.DTO.ScheduleJobLogStatisticsDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 定时任务日志
 * @author lv
 */
@Mapper
@Repository
public interface ScheduleJobLogDao extends BaseMapper<ScheduleJobLogDO> {

    /**
     * 分页查询定时任务日志列表
     * @param page 分页对象
     * @param pageQuery 分页搜索信息
     * @return 分页信息
     */
    Page<ScheduleJobLogDTO> selectPageScheduleJobLog(Page page,@Param("query") ScheduleJobLogPageQuery pageQuery);

    /**
     * 查询定时任务统计信息
     * @param jobId 任务ID
     * @return 定时任务统计信息列表
     */
    List<ScheduleJobLogStatisticsDTO> selectScheduleJobLogStatistics(String jobId);
}
